//
//  HomeTableViewCell.m
//  礼物说
//
//  Created by Marry W. on 16/1/5.
//  Copyright © 2016年 www.lanou39.蓝鸥科技. All rights reserved.
//

#import "HomeTableViewCell.h"

@implementation HomeTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.movieImage = [[UIImageView alloc] init];
//        _movieImage.backgroundColor = [UIColor cyanColor];
        _movieImage.layer.cornerRadius = 10;
        [self.contentView addSubview:_movieImage];
        
        self.moviewLabel = [[UILabel alloc] init];
//        _moviewLabel.backgroundColor = [UIColor redColor];
        _moviewLabel.textColor = [UIColor whiteColor];
        _moviewLabel.numberOfLines = 0;
        [self.contentView addSubview:_moviewLabel];
        
        self.loveImage = [[UIImageView alloc] init];
        _loveImage.userInteractionEnabled = YES;
        self.button = [UIButton buttonWithType:UIButtonTypeCustom];
        [_button setShowsTouchWhenHighlighted:YES];
        [self.contentView addSubview:_button];
//        _loveImage.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:_loveImage];
        
        self.loveLabel = [[UILabel alloc] init];
        _loveLabel.textColor = [UIColor whiteColor];
//        _loveLabel.backgroundColor = [UIColor blackColor];
        _loveLabel.textAlignment = NSTextAlignmentCenter;
        _loveLabel.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_loveLabel];
        
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.movieImage.frame = CGRectMake(5, 5, 365, 167);
    self.moviewLabel.frame = CGRectMake(10, 137, 355, 30);
    self.loveImage.frame = CGRectMake(300, 5, 30, 30);
    self.button.frame = CGRectMake(300, 5, 30, 30);
    self.loveLabel.frame = CGRectMake(298, 35, 35, 15);
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
